{% extends 'admin-v2/layout.html.twig' %}

{% do script(['app/js/admin-v2/operating/certificate-template/step-two/index.js']) %}

{% set menu = 'admin_v2_certificate_template_manage' %}

{% block main %}
  <h4 class="mtl mbl">{{ 'admin.operation_certificate.template.create'|trans }}——{{ 'admin.operation_certificate.template.create.select'|trans }}</h4>
  <form id="certificate-template-form" class="form-horizontal" method="post" action="{{ path('admin_v2_certificate_template_creat_step_two', {id:template.id}) }}">

    <div class="form-group">
      <div class="col-md-2 control-label">
        <label for="type" class="control-label-required">{{ 'admin.operation_certificate.template.create.select'|trans }}：</label>
      </div>
      <div class="col-md-8 controls">
        <div class="controls col-md-8 radios">
          <label><input type="radio" name="styleType" value="horizontal" {% if template.styleType|default('horizontal') == 'horizontal' %}checked{% endif %}>{{ 'admin.operation_certificate.template.style.horizontal'|trans }}</label>
          <label><input type="radio" name="styleType" value="vertical" {% if template.styleType|default('horizontal') == 'vertical' %}checked{% endif %}>{{ 'admin.operation_certificate.template.style.vertical'|trans }}</label>
        </div>
      </div>
    </div>

    <div class="form-group ct-mtl">
      <div class="col-md-2 control-label">
      </div>
      <div class="controls col-md-3">
        <img class="js-horizontal {% if template.styleType|default('horizontal') == 'vertical' %}hidden{% endif %}" src="{{ asset('static-dist/app/img/admin-v2/horizontal_certificate.png') }}" alt="horizontal certificate" width="720" height="520">
        <img class="js-vertical {% if template.styleType|default('horizontal') == 'horizontal' %}hidden{% endif %}" src="{{ asset('static-dist/app/img/admin-v2/vertical_certificate.png') }}" alt="vertical certificate" width="520" height="720">
      </div>
    </div>

    <div class="form-group ct-mtl">
      <div class="col-md-2 control-label">
      </div>
      <div class="controls col-md-3">
        <button type="submit" class="btn btn-primary ct-mrxl" data-submitting-text="{{ 'form.btn.save.submiting'|trans }}">{{ 'form.btn.next'|trans }}</button>
        <a class="btn btn-default" href="{{ path('admin_v2_certificate_template_edit', {id:template.id}) }}">{{ 'form.btn.back'|trans }}</a>
      </div>
    </div>

    <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">

  </form>
{% endblock %}